package com.sghy.xcxservice.common;

public class CustomException extends RuntimeException{
    private final Error code;

    public CustomException(Error errorCode) {
        super(errorCode.getMessage());
        this.code = errorCode;
    }

    public CustomException(Error errorCode, String message) {
        super(message);
        this.code = errorCode;
    }

    public Error getError() {
        return code;
    }
}
